import React, { Component, Fragment } from "react";
import './style.css'
class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      isshow: true
    };
    this.handleClick = this.handleClick.bind(this);
  }

  render() {
    return (
      <Fragment>
        <div className={this.state.isshow ? "show" : "hide"}> hello </div>
        <button onClick={this.handleClick}> change </button>
      </Fragment>
    );
  }
  handleClick(){
      this.setState(()=>{
          return {
              isshow:this.state.isshow?false:true
          }
      })
  }
}
export default App;
